<?php

namespace app\common\model;

/**
 * [智慧寺院入驻信息]
 * @author [C。]
 * @return html
 */
class ZhcheckinMess extends Base
{
    protected $name = 'zhcheckin_mess';
    /**
     * 根据搜索条件获取寺院列表信息
     */
    public function getlist($map,$from = 0, $size = 5,$field = '*')
    {
        $order = ['id' => 'desc'];
        $result =  $this->field($field)->order($order)
            ->where($map)
            ->limit($from,$size)
            ->select();
        return $result;
    }
    /**
     * 根据搜索条件获取所有的用户数量
     * @param $where
     */
    public function getCount($map)
    {
        $result =  $this
            ->where($map)
            ->count();
        return $result;
    }
    /**
     * 根据搜索条件获取寺院列表信息
     */
    public function getFindOne($map,$field = '*')
    {
        $result =  $this->field($field)->where($map)->find();
        return $result;
    }
    /**
     * 根据条件修改内容
     */
    public function editStatus($map)
    {
        $result =  $this->where($map)->update(['status'=>0]);
        return $result;
    }
}